<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>render</title>
</head>

<body>
    <div id="app">
        <p>{{o}}</p>
        <p>dog: {{dog.name}}</p>
        <button @click="clickHandler()">change</button>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>

    <script>
        let vm = new Vue({
            el: '#app',
            data: {
                o: 'object',
                dog: {}
            },
            methods: {
                clickHandler () {
                    // 该 name 属性是否是响应式的
                    this.dog.name = 'Trump'
                    console.log(this.dog);
                }
            }
        })
    </script>
</body>

</html>